# -*- encoding:utf-8 -*-
"""
@作者：ven
@文件名：view.py
@时间：2023-07-18  19:44
@文档说明:
"""

import PySimpleGUI as sg

def myTab():
    tab1_layout = [
                   [sg.Text('请输入Token'),sg.Input(size=(200,100))],
                   [sg.B('添加病例'),sg.B('添加优惠券'),sg.B('添加活动')]
                   ]

    tab2_layout = [[sg.T('This is inside tab 2')],
                   [sg.In(key='in')]]


    layout = [[sg.TabGroup([[sg.Tab('Tab 1', tab1_layout), sg.Tab('Tab 2', tab2_layout)]])],
              [sg.Button('Read')]]
    window = sg.Window("Tree Example", layout, size=(500, 200),use_default_focus=False)
    while True:
        event, values = window.read()
        print(event, values)
        if event == sg.WIN_CLOSED or event == 'Exit':
            break
    window.close()

myTab()